package com.guomei.bean.curse;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class CreateOrUpdateCourseCategoryRelationDTO {
    /**
     * 关联ID
     */
    private Long id;

    /**
     * 课程ID，关联course表
     */
    @NotNull(message = "课程ID不能为空")
    @NotEmpty(message = "课程ID列表不能为空")
    private List<Long> courseIds;

    /**
     * 类别ID，关联course_category表
     */
    @NotNull(message = "类别ID不能为空")
    private Long categoryId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdTime;

    // private static final long serialVersionUID = 1L;
}
